import Vue from 'vue';
import Router from 'vue-router';
import layout from '@/components/layout/content';

Vue.use(Router)
const page = name => () => import('@/pages/' + name)
export default new Router({
  routes: [
    {
      path: '',
      component: layout,
      children: [
        {
          path: '/',
          name: 'home', 
          component: home, 
          meta: {
            menu: 1,
            title: '首页'
          }
        },
        { 
          path: '/404', 
          name: '404', 
          component: page('404') 
        },
    },
    { path: '*', redirect: { name: '404' } }
  ]
})
